package com.gm.commonlib.base.baseui.baseListviewUI;
import android.os.Bundle;
import android.view.ViewGroup;

import com.gm.commonlib.R;
import com.gm.commonlib.base.baseui.baseactivity.CommonAbstractBaseActivity;

abstract class BasePullToRefeshViewActivity extends CommonAbstractBaseActivity {

  protected ViewGroup mainContent;
  protected ViewGroup fl_container_title;
  protected ViewGroup fl_container;
  protected ViewGroup fl_container_header;
  protected ViewGroup fl_list_container;
  protected ViewGroup fl_container_footer;


  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_base_list0);
      mainContent = findViewById(R.id.content);
      fl_container_title =  findViewById(R.id.fl_container_title);
      fl_container =  findViewById(R.id.fl_container);
      fl_container_header =  findViewById(R.id.fl_container_header);
      fl_list_container =  findViewById(R.id.fl_list_container);
      fl_container_footer =  findViewById(R.id.fl_container_footer);


      onCreateMainContentView(mainContent); //主界面
      onCreateContentTitle(fl_container_title);//title
      onCreateContentHeader(fl_container_header);//title下面header部分
      onCreateContentBody(fl_list_container);//title下面header部分
      onCreateContentContainer(fl_container);//header下面类容区
      onCreateContentFooter(fl_container_footer); //底部区域

  }

  protected void onCreateMainContentView(ViewGroup parent) {
  }


  protected void onCreateContentTitle(ViewGroup parent) {


  }

  public void showTitle(String title) {

  }


  protected void onCreateContentContainer(ViewGroup parent) {
  }

  /**
   * 创建容器头部容器</br>
   *
   * @param parent 向parent设置滑动布局 内容
   */
  protected void onCreateContentHeader(ViewGroup parent) {

  }

  /**
   * 提供默认的创建刷新界面的处理</br>
   *
   * @param parent 向parent设置滑动布局 内容
   */
  protected void onCreateContentBody(ViewGroup parent) {

  }

  /**
   * 创建容器脚部容器</br>
   *
   * @param parent 向parent设置滑动布局 内容
   */
  protected void onCreateContentFooter(ViewGroup parent) {
  }

}
